package com.sumainfor.pc.market.controller.rentadviser;
import com.sumainfor.common.util.JsonResult;
import com.sumainfor.pc.market.service.RdCorporateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * @Date 2018年11月7日
 * @Describe 工程部查询房源配置
 */
@RestController
@RequestMapping("/rentadviser/RdCorporateController")
public class RdCorporateController implements Serializable {
    @Autowired
    private RdCorporateService rdCorporateService;
    /**
     *新增企业客户
     * @param
     * @return
     */
    @PostMapping("/addCorporate")
    public JsonResult getRepairList(@RequestBody Map<String,Object>params){
        return rdCorporateService.addCorporate(params);
    }
    /**
     *运营部查询所有的服务秘书
     */
    @GetMapping("/getCorporateList")
    public JsonResult getCorporateList() {
        JsonResult result = new JsonResult();
        List<Map<String, Object>> list = rdCorporateService.getCorporateList();
        if (list != null) {
            result.put(list);
        } else {
            result.putFailed("服务器繁忙");
        }
        return result;
    }
}
